<template>
	<view>
		<navbar title="我的设置" :autoBack="true"></navbar>
		<scroll-view scroll-y="true" class="scbox">
			<view class="con">
				<view class="con__box">
					<view class="con__box__item" v-for="(item,index) in list" :key="index" @click="navto(item.url)">
						<view class="con__box__item__label">
							{{item.text}}
						</view>
						<image src="/static/my/m.png" class="con__box__item__m" mode=""></image>
					</view>
					<view class="footer" @click="loginout">
						<image src="/static/my/btn.png" class="btn" mode=""></image>
						<view class="footer__text">
							退出登录
						</view>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						text: '关于88ff财富广场',
						url: ''
					},
					{
						text: '修改密码',
						url: '/pages/index/editpws'
					},
					{
						text: '收货地址',
						url: '/pages/addr/list'
					},
				]
			};
		},
		methods:{
			loginout(){
				uni.showModal({
					title:'提示',
					content:'是否确认退出登录？',
					success(r) {
						if(r.confirm){
							uni.removeStorageSync('88ffuserinfo')
							uni.removeStorageSync('88ftoken')
							uni.reLaunch({
								url:'/pages/index/login'
							})
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f0f3f7;
	}

	.con {
		padding: 20rpx 30rpx;

		&__box {
			padding: 0 0 124rpx 38rpx;
			background: #FFFFFF;
			border-radius: 30rpx;

			&__item {
				display: flex;
				align-items: center;
				justify-content: space-between;
				height: 150rpx;
				padding-right: 32rpx;
				border-bottom: 2rpx #F9F9F9 solid;

				&__label {
					font-family: PingFang SC;
					font-weight: 500;
					font-size: 30rpx;
					color: #000000;
				}

				&__m {
					width: 14rpx;
					height: 25rpx;
				}
			}

		}
	}

	.footer {
		position: relative;
		margin-top: 120rpx;
		.btn {
			width: 615rpx;
			height: 96rpx;
		}

		&__text {
			width: 615rpx;
			display: flex;
			justify-content: center;
			font-family: PingFang SC;
			font-weight: 500;
			font-size: 32rpx;
			color: #3A4E6D;
			line-height: 32rpx;
			// padding-top: 33rpx;
			position: absolute;
			padding-top: 32rpx;
			top: 0;
			left: 0;
		}
	}
</style>